package com.swallow.cloud.common;

import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.HashMap;

/**
 * @Author: L.swallow
 * @Date: 2019/3/8 11:56
 */
public class Result extends HashMap <String, Object> {

    public Result() {
        put("code", 0);
    }
    public Result(IPage page) {
        Result r= new Result();
        r.put("totalPage",page.getTotal()/page.getSize());
        r.put("page",page);
    }


}
